package com.itheima.callable;

import java.util.concurrent.Callable;

//实现Callable，给定返回值类型
public class MyCallable implements Callable<String> {

    //重写call方法，该方法有返回值
    @Override
    public String call() throws Exception {
        for (int i = 0; i < 100; i++) {
            System.out.println("第"+i+"次向女孩表白！");
        }
        return "成功";
    }
}
